#include <mockcpp/mockcpp.hpp>

#include <testngpp/testngpp.hpp>
#include <ProbabilityEvent.h>

USING_MOCKCPP_NS
USING_TESTNGPP_NS

FIXTURE(ProbabilityEvent)
{
        TEST(should be able to calc probability of Event not occurrence)
        {
                ProbabilityEvent event(0.25) ;
                ASSERT_EQ(0.75, !event);
        }

        TEST(should be able to calc probability of two Event occurrence simultaneously)
        {
                ProbabilityEvent eventA(0.32);
                ProbabilityEvent eventB(0.54);

                ASSERT_EQ(0.1728f, eventA&eventB);
        }

        TEST(should be able to calc probability of one of the two Event occurrence)
        {
                ProbabilityEvent eventA(0.32);
                ProbabilityEvent eventB(0.54);

                ASSERT_EQ(0.6872f, eventA|eventB);
        }

};
